package com.example.demo.Configur;

import com.example.demo.modle.User;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class BeanConfigur {
    @Bean
    public User user(){
        User user = new User();
        user.setName("zhangsan");
        user.setAge(20);
        return user;
    }
}
